Method and system for distinguishing between charging ports

ABSTRACT

Disclosed is a method for use by a device to distinguish between a Charging Downstream Port (“CDP”) and a Dedicated Charging Port (“DCP”). The method comprises detecting that the device is attached to a charging port, and determining whether the charging port is the CDP or the DCP without causing a host coupled to the CDP to be able to detect the device if the charging port is the CDP.

RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.12/661,924, filed Mar. 25, 2010, which claims priority to U.S.Provisional Application No. 61/276,469 filed Sep. 10, 2009, which ishereby incorporated by reference in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is generally in the field of communication methodsand systems. More specifically, the present invention is in the field ofnetwork communication methods and systems.

2. Background Art

Universal Serial Bus (“USB”) ports provide convenient locations and anefficient power solution to charge portable devices using a widelyadaptable USB cable and a personal computer, hub or USB charger.Portable devices, however, must accommodate the fact that a personalcomputer or hub draws a different amount of current than a USB charger.Consequently, a portable device must distinguish between different typesof charging ports, including a Dedicated Charging Port (“DCC”)—acharging port corresponding to a USB charger, and a Charging DownstreamPort (“CDP”)—a charging port corresponding to a personal computer orhub. A more detailed description of the general standards for chargingportable devices using USB technology may be found in the USB BatteryCharging Specification, Revision 1.1, published by USB ImplementersForum, Inc. (www.usb.org) on Apr. 15, 2009 (the “BC Spec”), which ishereby incorporated by reference in its entirety.

Conventional schemes to distinguish between CDP and DCP have a number ofshortcomings. For example, as explained below, the detection processused in conventional schemes cause personal computers or hubs (using CD)to begin communication with the portable device, although the portabledevice merely intends to determine the type of charging port.

FIG. 1 shows dedicated charging port (“DCP”) circuit 100 adapted toconnect to a portable device. Supply voltage pin 106 provides a positivesupply voltage of a value V_(BUS) to DCP circuit 100, and ground pin 112provides a ground voltage to DCP circuit 100. Positive data line 108 andnegative data line 110 are connected through a resistor or resistivenetwork such as resistor 104 with value R_(CHG DAT). As described in theBC Spec, operates at 5.25 Volts (V) and V_(BUS) R_(CHG DAT) has a valueor 200 ohms. DCP circuit 100 may provide a portable device with up to1.8 Amperes (A) of current at 5.25 V through supply voltage pin 106.Since DCP circuit 100 shorts positive data line 108 and negative dataline 110 with resistor 104, DCP circuit 100 does not transfer data to orfrom a connected portable device. For example, a binary signal that hasa step transition between a logical LOW value of below 0.8 V and alogical HIGH value of above 2.0 V on positive data line 108 merelyreturns to negative data line 110 through resistor. Consequently, DCPcircuit 100 can charge a portable device but is incapable of processinglogical data for a portable device or supporting data communicationsbetween a host and a device.

FIG. 2 illustrates charging downstream port (“CDP”) circuit 200. CDPcircuit 200 includes supply voltage pin 206, ground pin 212, positivedata line 208 and negative data line 210. These pins are similar torespective pins illustrated in DCP circuit 100 of FIG. 1. Internally,CDP circuit 200 includes positive switch 236, positive pull-downresistor 220, comparator 228, positive data line current sink 230,negative data line voltage source 224, negative switch 226, negativepull-down resistor 222, and AND gate 240. Portable detect signal 238comes from AND gate 240 into physical layer 204. Portable detect signal238 may be configured to correspond to digital logic values, includingfor example, a value of 0 to 0.8 V corresponding to a logical LOW signaland a value of above 2.0 V corresponding to a logical HIGH signal. Asshown in FIG. 2, CDP circuit 200 includes comparator 228, as well asleakage resistors 216 and leakage voltages 218. Positive data linecurrent sink 230 is configured to draw between 50 and 150 microamperes(μA) of current. Negative data line voltage source 224 is configured toprovide between 0.5 and 0.7 V. Data detect voltage 232 provides avoltage between 0.25 and 0.4 V.

CDP circuit 200 in FIG. 2 is capable of supporting data communicationbetween a host coupled thereto and a device. More specifically, CDPcircuit 200 can receive differential signals corresponding to logicalLOW or logical HIGH voltages in differential form across positive dataline 208 and negative data line 210. These differential voltages maycorrespond to packetized information, including for example, controlinstructions or data, which are used for communicate between theportable device and a host coupled to CDP circuit 200.

One means of communication via a CDP circuit 200 is by driving a voltageequal to negative data line voltage source 224 onto negative data line210. When CDP circuit 200 receives a voltage on positive data line 208that is greater than data detect voltage 232 and is less than the logicthreshold of CDP circuit 200 (namely below the logical LOW thresholdvoltage value of 0.8 V), portable detect signal 238 is asserted. CDPcircuit 200 actively responds to this signal by switching negativeswitch 226 and driving the voltage at negative data line voltage source224 onto negative data line 210, actively transmitting that value backto the portable device. For example, if a voltage on positive data line210 lies between 0.4 V (the maximum value of data detect voltage source224) and 0.8 V (the minimum value of the logic threshold voltage), avoltage of between 0.5 V and 0.7 V corresponding to negative data linevoltage source 224 will be applied to negative data line 210 andtransmitted back to the portable device.

Turning to FIG. 3, FIG. 3 illustrates conventional portable devicecircuit 300 adapted to connect to either a DCP or a CDP. Conventionalportable device circuit 300 comprises pins to interface to a DCP or aCDP, including supply voltage pin 306 to draw charge, ground pin 312,positive data line 308, negative data line 310 and ID pin 314. Positivedata line 308 and negative data line 310 allow conventional portabledevice circuit 300 to distinguish between a DCP or a CDP using logicalsignals in differential form.

Internally, conventional portable device circuit 300 includes voltageswitch 352, current switch 354, comparator switch 356, pull-down switch368, and pull down resistor 370. Conventional portable device circuit300 further includes positive data line voltage source 348, data connectdetect current source 350, negative data line current sink 358, datadetect voltage 360 and AND gate 364. Comparator 362 is capable ofcomparing data detect voltage 360 with a voltage on negative data line310. Charger detect signal 366 comes into physical layer 342 through ANDgate 364. Physical layer 342 includes leakage resistors 344 with leakagevoltages 346. Negative data line current sink 358 is configured to drawbetween 50 and 150 microamperes (μA) of current. Positive data linevoltage source 348 is configured to provide between 0.5 and 0.7 V.

During a start-up sequence, conventional portable device circuit 300 isrequired to detect a charging port and classify the detected chargingport as a DCP or a CDP to determine how much current it can draw fromthe charging port. Conventional portable device circuit 300 beginsoperation in low bandwidth of full bandwidth mode. Conventional portabledevice circuit 300 then closes voltage switch 352, current switch 354and comparator switch 356 to raise the voltage on positive data line 308to positive data line source voltage 348, that is to a logical HIGH.After a positive voltage source on time of about 40 milliseconds (ms),conventional portable device circuit 300 then checks the voltage atnegative data line 310. If the voltage at negative data line 310 isabove data detect voltage 360 but below the logic threshold ofconventional portable device circuit 300, conventional portable devicecircuit 300 has detected that a charging port is attached and is allowedto draw a specified portable device current from the charging port.

To classify the attached charging port as a DCP or a CDP, conventionalportable device circuit 300 asserts a logical HIGH value (that is avalue exceeding the circuit's logical threshold voltage of 2.0 V) ontopositive data line 308. If the attached charging port is a DCP, thevoltage on negative data line 310 will also go to a logical HIGH value,because a DCP shorts positive data line 308 and negative data line 310through an internal resistor (shown in FIG. 1). Thus, despite thepresence of the internal resistor, the voltage at negative data linewill reach a logical HIGH value and allow conventional portable devicecircuit 300 to determine that a DCP is connected. In such a case,conventional portable device circuit 300 and may attempt to draw acurrent of up to 1.8 A.

On the other hand, if the attached port is a CDP, the voltage onpositive data line 308 will cause a communication with the portabledevice. Consistent with FIG. 3, the voltage on positive data line 308will correspond to a logical HIGH. The CDP will recognize a voltageexceeding the logical threshold value, and will not drive that voltageto negative data line 310 thereby communicating a voltage value of alogical LOW back to conventional portable device circuit 300. Thus, if aCDP is attached, the voltage at negative data line 310 will remain at alogical LOW value of below 0.8 V despite the fact that the voltage atpositive data line 308 was raised to a logical HIGH value. In such acase, conventional portable device circuit 300 will know that a CDP isattached. Conventional portable device circuit 300 will draw a currentof 1.5 A at low or full bandwidths. If a CDP is attached, the USB systemmay later enter high bandwidth mode and draw a current 900 mA in thatmode. Requiring the CDP to process the logical transitions outlinedabove and requiring the CDP to communicate a voltage value of a logicalLOW back to conventional portable device circuit 300 undermines therobustness of the USB system, as it causes the host coupled to the CDPto attempt data communications with the portable device that is merelytrying to determine the type of charging port.

Accordingly, there is a need to overcome the drawbacks and deficienciesin the art by providing methods and systems for a portableUSB-compatible devices for distinguishing between charging ports, whichenhance interoperability of the portable device with the charging port,while remaining compatible with existing USB technology.

SUMMARY OF THE INVENTION

There are provided methods and systems for distinguishing betweencharging ports, substantially as shown in and/or described in connectionwith at least one of the figures, as set forth more completely in theclaims.

BRIEF DESCRIPTION OF THE DRAWINGS

The features and advantages of the present invention will become morereadily apparent to those ordinarily skilled in the art alter reviewingthe following detailed description and accompanying drawings, wherein:

FIG. 1 shows a conventional dedicated charging circuit;

FIG. 2 shows a conventional charging downstream circuit;

FIG. 3 shows a conventional portable device circuit;

FIG. 4 shows a portable device circuit, according to one embodiment ofthe present invention; and

FIG. 5 is a flowchart presenting a method for distinguishing betweencharging ports according to one embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention is directed to a method and system fordistinguishing between charging ports. Although the invention isdescribed with respect to specific embodiments, the principles of theinvention, as defined by the claims appended herein, can obviously beapplied beyond the specifically described embodiments of the inventiondescribed herein. Moreover, in the description of the present invention,certain details have been left out in order to not obscure the inventiveaspects of the invention. The details left out are within the knowledgeof a person of ordinary skill in the art. The drawings in the presentapplication and their accompanying detailed description are directed tomerely exemplary embodiments of the invention. To maintain brevity,other embodiments of the invention, which use in principles of thepresent invention are not specifically described in the presentapplication and are not specifically illustrated by the presentdrawings. It should be borne in mind that, unless noted otherwise, likeor corresponding elements among the figures may be indicated by like orcorresponding reference numerals. Moreover, the drawings andillustrations in the present application are generally not to scale, andare not intended to correspond to actual relative dimensions.

FIG. 4 illustrates portable device circuit 400 capable of distinguishingbetween charging ports without causing the host to be able to detect thedevice, which could result in a data communication initiation by a hostcoupled to a CDP with the portable device. Portable device circuit 400may interface with a charging port through supply voltage pin 406 todraw charge, ground pin 412, positive data line 408, negative data line410 and ID pin 414. Positive data line 408 and negative data line 410may allow portable device circuit 400 to communicate with a chargingport with logical signals in differential form.

Internally, portable device circuit 400 may comprise voltage switch 452,current switch 454, comparator switch 456, pull-down switch 468, andpull down resistor 470. Conventional portable device circuit 400 mayalso include positive data line voltage source 448, data connect detectcurrent source 450, negative data line current sink 458, data detectvoltage 460 and AND gate 464. Portable device circuit 400 may furthercomprise comparator 462 to compare data detect voltage 460 with avoltage on negative data line 410. AND gate 464 may output chargerdetect signal 466 into physical layer 442. Physical layer 442 mayinclude leakage resistors 444 with leakage voltages 446.

Portable device circuit 400 may further include second voltage switch472 connected between negative data line 410 and voltage source 448,second current switch 474 connected between negative data line 410 andcurrent source 450 and exemplary positive comparator switch 476connected between positive data line 408 and AND gate 464. Consistentwith the BC Spec, negative data line current sink 458 may be configuredto draw between 50 and 150 μA of current. Moreover, positive data linevoltage source 448 may provide between 0.5 and 0.7 V. Data detectvoltage 460 may supply a voltage between approximately 0.25 and 0.4 V.Consistent with the BC Spec, exemplary voltages of below 0.8 V and above2.0 V may govern respective logical LOW and HIGH voltages for portabledevice circuit 400.

The exemplary embodiment of a system for distinguishing between chargingports illustrated in FIG. 4 will be further described by reference toflowchart 500 in FIG. 5, which describes the steps, according to oneembodiment of the present invention, of a method for distinguishingbetween charging ports. It is noted that certain details and featureshave been left out of flowchart 500 that are apparent to a person ofordinary skill in the art. For example, a step may comprise one or moresubsteps as known in the art. While steps 510 through 550 indicated inflowchart 500 are sufficient to describe one embodiment of the presentinvention, other embodiments of the invention, may utilize stepsdifferent from those shown in flowchart 500.

Beginning with step 510 of flowchart 500 and referring to FIG. 4, step510 includes applying a source voltage to positive data line 408 ofportable device circuit 400. As illustrated in FIG. 4, step 510comprises closing voltage switch 452, current switch 454 and comparatorswitch 456. In step 510, second voltage switch 472 second current switch474 and second comparator switch 476 are held open. Closing switches452, 454 and 456, and opening switches 472, 474 and 476 raise thevoltage on positive data line 408 to the value of positive data linesource, voltage 448, that is a value between, for example, 0.5 V and 0.7V. As a result, a source voltage is applied to positive data line 408 ofportable device circuit 400.

Continuing to step 520 of flowchart 500 and referring to FIGS. 2 and 4,step 520 comprises detecting whether the portable device is attached toa charging port. With reference to FIG. 4, portable device circuit 400is configured to wait a first specified time period, e.g. 40 ms, andthen evaluating whether the voltage on negative data line is non-zero.If no charging port is attached, the voltage on negative line may stayat a zero value, for example 0 V.

However, if a charging port is attached to portable device circuit 400,the positive source voltage is detected on negative data line 408. Forexample, a DCP connected to portable device circuit 400 would pass thesource voltage through an internal resistor (shown as resistor 104 inFIG. 1) and ultimately raise the voltage of negative data line 410 inFIG. 4 to a non-zero value. Similarly, an attached CDP would detect thesource voltage at positive data line 40 i and would apply a negativesource voltage to negative data line 410. With reference to FIG. 2, CDPcircuit 200 would detect the positive source voltage at positive dataline 208 and would close negative switch 226. CDP circuit 200 wouldfurther apply negative data line voltage source 224 corresponding to avoltage of between approximately 0.5 and 0.7 V to negative data line210. Returning to FIG. 4, the negative source voltage would appear onnegative data line 410. As such, portable device circuit 400 may beconfigured to detect whether a charging port is attached.

Continuing to step 530 of flowchart 500 and referring to FIG. 4, step530 of flowchart 500 comprises applying a source voltage to the negativedata line of the portable device. With reference to FIG. 4, portabledevice circuit 400 is configured to wait a second specified time period.The second specified time period could be equal to or different than thefirst specified time period. For example, like the first specified timeperiod, the second specified time period could be 40 ms. After thesecond specified time period, portable device circuit 400 changes thepolarity of switches 452, 454, 456, 472, 474 and 476 and then applies asource voltage to negative data line 410.

More specifically, portable device circuit 400 opens voltage switch 452,current switch 454 and comparator switch 456, which were all closed instep 510. Portable device circuit 400 also closes second voltage switch472, second current switch 474 and second comparator switch 476, whichwere all held open in step 510. Thus, pursuant to step 530, positivedata line 408 is disconnected from each of positive data line voltagesource 448, data connect detect current source 450, negative data linecurrent sink 458, comparator 462 and AND gate 464. Conversely, understep 530, negative data line 410 is connected to each of positive dataline voltage source 448, data connect detect current source 450,negative data line current sink 458, comparator 462 and AND gate 464. Asa result of step 530, the voltage at positive data line voltage source448, which may range between 0.5 V and 0.7 V, is applied to negativedata line 410. Thus, pursuant to step 530, portable device circuit 400is configured to apply a source voltage to negative data line 410.

Turning to step 540 of Flowchart 500 and referring to FIGS. 1, 2 and 4,step 540 comprises determining whether the detected charging port is aDCP or a CDP without causing the host coupled to CDP to be able todetect the device, as a result of the detection process, which couldresult in the host starting a data communication with the device via theCDP. With reference to FIG. 4, portable device circuit 400 is configuredto wait a third specified time period the third specified time periodcould be equal to or different than the first or second specified timeperiods. For example, the third specified time period could be 40 ms.After the third time period, portable device circuit 400 measures thevoltage on positive data line 408 to determine whether a DCP or a CDP isattached.

In the event that a DCP is attached to portable device circuit 400, thepath between negative data line 410 and positive data line 408 willcomprise a resistive network. With reference to FIGS. 1 and 4, if DCPcircuit 100 in FIG. 1 were connected to portable device circuit 400 inFIG. 4, the applied source voltage would be passed through internalresistor 104 in FIG. 1, raising the voltage of positive data line 408 inFIG. 4 to a value approximately equal to the value of the applied sourcevoltage. The voltage at positive data line 408 may, however, be detectedby comparator 462. The resulting voltage will cause output chargerdetect signal 466 from AND gate 464 to go to a logical HIGH value, andcorrespond to the determination of a DCP.

Conversely, in the event that a CDP is attached to portable devicecircuit 400, the applied source voltage will not transfer to positivedata line 408. With reference to FIGS. 2 and 4, if CDP circuit 200 inFIG. 2 were connected to portable device circuit 400 in FIG. 4, theapplied source voltage would pass through negative pull-down resistor222 in FIG. 2 to a ground node and leakage resistor 216 in FIG. 2 intophysical layer 204 in FIG. 2. As no path within CDP circuit 200 connectsnegative data line 210 and positive data line 208 in FIG. 2, the appliedsource voltage would not transfer to positive data line 208. Returningto FIG. 4, the voltage at positive data line 408 will not reflect thesource voltage previously applied to negative data terminal 410. Assuch, comparator 462 will not detect a change in positive data line 408.The resulting voltage will cause output charger detect signal. 466 fromAND gate 464 to go to a logical LOW value, and will correspond to thedetermination of a CDP.

Accordingly, the determination of the charging port as a DCP or a CDPdoes not cause the host to be able to detect the device, which couldresult in a data communication initiation by a host coupled to a CDPwith the portable device. Consistent with FIG. 4, positive sourcevoltage 448 may cause a voltage of between 0.5 V and 0.7 V to be appliedto negative data line 410. This voltage is less than the minimumvoltages corresponding to a logical swing across negative data line 410and positive data line 408. More specifically, positive source voltage448 applies a voltage less than the value of a differential signalacross negative data line 410 and positive data line 408. Thus, applyingthe voltage to negative data line 410 will not appeal as an attempt tostart data communication with the host via the CDP. Accordingly, anembodiment of the present invention may determine whether the detectedcharging port is a DCP or a CDP without causing a communication to occurvia the CDP or without causing the host to be able to detect the device.

Turning to step 550 of flowchart 500 and referring to FIG. 4, step 550comprises providing a determination signal corresponding to one of a DCPor a CDP. Portable device circuit 400 may be used to provide a signalcorresponding to a DCP or a CDP. For example, charger detect signal 466may be adapted to return a logical HIGH value when a DCP is detected.Alternatively, charger detect signal 466 may be adapted to return alogical LOW value when a CDP is detected. Accordingly, portable devicecircuit 400 may be adapted to provide a determination signalcorresponding to one of a DCP or a CDP.

Thus, the present application discloses a novel and inventive solutionfor distinguishing between charging ports, especially those chargingports of a USB system. By selectively applying a source voltage topositive and negative data lines of a portable device, the presentinvention distinguishes charging ports without causing the host to beable to detect the device, which could result in a data communicationinitiation by a host coupled to a CDP with the device. Moreover, thedisclosed solution is advantageously compatible with existing USBtechnology. Although embodiments of the present invention are describedin conjunction with a portable device, the present invention is notlimited to portable devices and is equally applicable to all types ofdevices.

From the above description of the invention it is manifest that varioustechniques can be used for implementing the concepts of the presentinvention without departing from its scope. Moreover, while theinvention has been described with specific reference to certainembodiments, a person of ordinary skill in the art would recognize thatchanges could be made in form and detail without departing from thespirit and the scope of the invention. The described embodiments are tobe considered in all respects as illustrative and not restrictive. Itshould also be understood that the invention is not limited to theparticular embodiments described herein, but is capable of manyrearrangements, modifications, and substitutions without departing fromthe scope of the invention.

What is claimed is:
 1. A method for use by a device to distinguishbetween a Charging Downstream Port (CDP) and a Dedicated Charging Port(DCP), said method comprising: connecting a voltage source in saiddevice to a positive data line of said device; detecting whether saiddevice is connected to a charging port while said voltage source isconnected to said positive data line; disconnecting said voltage sourcefrom said positive data line; connecting said voltage source in saiddevice to a negative data line of said device; and determining whethersaid charging port is said DCP or said CDP by measuring a voltage onsaid positive data line while said voltage source is connected to saidnegative data line, wherein a voltage value of said voltage source isless than a logical high threshold value of said CDP.
 2. The method ofclaim 1, wherein said detecting whether said device is connected to acharging port is performed a first predetermined time period after saidconnecting said voltage source to said positive data line.
 3. The methodof claim 1, wherein said detecting whether said device is connected tosaid charging port is based on a measured voltage on said negative dataline while said voltage source is connected to said positive data line.4. The method of claim 1, wherein said detecting whether said device isconnected to said charging port further comprises comparing a voltage onsaid negative data line with a reference voltage utilizing a comparatorin said device.
 5. The method of claim 1, wherein said connecting saidvoltage source to said positive data line comprises closing a firstswitch disposed between said voltage source and said positive data line.6. The method of claim 1, wherein said disconnecting said voltage sourcefrom said positive data line comprises opening a first switch disposedbetween said voltage source and said positive data line and wherein saidconnecting said voltage source in said device to said negative data linecomprises closing a second switch disposed between said voltage sourceand said negative data line.
 7. The method of claim 1, wherein saidconnecting said voltage source in said device to said negative data lineis performed a second predetermined time period after said detectingwhether said device is connected to said charging port.
 8. The method ofclaim 1, wherein said measuring said voltage on said positive data lineis performed a third predetermined time period after said connectingsaid voltage source to said negative data line.
 9. The method of claim1, wherein said measuring said voltage on said positive data linecomprises: opening a third switch disposed between an input of acomparator in said device and said negative data line of said device;and closing a fourth switch disposed between said input of saidcomparator and said positive data line.
 10. The method of claim 9,wherein said measuring said voltage on said positive data line furthercomprises comparing a voltage on said positive data line with areference voltage utilizing said comparator.
 11. A device fordistinguishing between a Charging Downstream Port (CDP) and a DedicatedCharging Port (DCP), the device comprising: a first switch disposedbetween a voltage source in said device and a positive data line of saiddevice, said first switch configured to connect said voltage source tosaid positive data line; a second switch disposed between said voltagesource and a negative data line of said device, said second switchconfigured to connect said voltage source to said negative data line; adetection circuit configured to detect whether said device is attachedto a charging port based on a measured voltage on said negative dataline while said voltage source is connected to said positive data line;and a determination circuit configured to determine whether saidcharging port is said CDP or said DCP by measuring a voltage on saidpositive data line while said voltage source is connected to saidnegative data line, wherein a voltage value of said voltage source isless than a logical high threshold value of said CDP.
 12. The device ofclaim 11, wherein said detection circuit is configured to detect, at afirst predetermined time period after connecting said voltage source tosaid positive data line, whether said device is connected to saidcharging port.
 13. The device of claim 11, wherein said determinationcircuit is configured to determine whether said charging port is saidCDP or said DCP a second predetermined time period after said detectioncircuit detects whether said device is attached to said charging port.14. The device of claim 11, further configured to measure said voltageon said positive data line while said voltage source is connected tosaid negative data line a third predetermined time period afterconnecting said voltage source to said negative data line.
 15. Thedevice of claim 11, further configured to close said first switch andopen said second switch before said detection circuit measures saidvoltage on said negative data line.
 16. The device of claim 11, whereinsaid detection circuit comprises a comparator for comparing a voltage onsaid negative data line with a reference voltage.
 17. The device ofclaim 16, wherein said determination circuit comprises said comparatorfor comparing a voltage on said positive data line with said referencevoltage.
 18. The device of claim 17, further comprising: a third switchdisposed between an input of said comparator and said negative dataline; and a fourth switch disposed between said input of said comparatorand said positive data line.
 19. The device of claim 18, furtherconfigured to open said third switch and close said fourth switch beforemeasuring said voltage on said positive data line.
 20. The device ofclaim 18, further configured to close said third switch and open saidfourth switch before measuring said voltage on said negative data line.